/*
 * -- HistoryDatabase.java --
 * 
 * Copyright 2011, Kyan He <kyan.ql.he@gmail.com>
 * 
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package im.kyan.android.googlefight;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class HistoryDatabase extends SQLiteOpenHelper {
    
    private static final int DATABASE_VERSION = 1;
    
    public static final String TABLE_NAME = "history";
    
    public static final String COLUME_ID = "_id";
    
    public static final String COLUME_KEY = "key";
    
    public static final String COLUME_RATE = "rate";
    
    public static final String COLUME_TIMESTAMP = "ts";
    
    private static final String TABLE_CREATE = "CREATE TABLE " + TABLE_NAME
            + " (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT, " + "key TEXT, "
            + "rate NUMERIC, " + "timestamp NUMERIC);";
    
    public HistoryDatabase(Context context) {
        super(context, "rate_db", null, DATABASE_VERSION);
    }
    
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(TABLE_CREATE);
    }
    
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // TODO Auto-generated method stub
        
    }
    
}
